package com.kingyun.gpsinspection.purificationservice.facade.service.iam.manage;
import com.alibaba.fastjson.JSONObject;
import com.kingyun.gpsinspection.purificationservice.facade.model.iam.manage.MaterialsInventory;
import com.kingyun.gpsinspection.purificationservice.facade.model.iam.manage.MaterialsOutbound;
import com.kingyun.gpsinspection.purificationservice.facade.model.iam.manage.MaterialsStorage;

/**
 * Created by yangsy on 2016/12/8.
 */
public interface MaterialsInventoryService {
    /**
     * 新增操作
     * @param record
     * @return
     */
    int insertSelective(MaterialsInventory record);

    /**
     * 更新操作
     * @param record
     * @return
     */
    int updateByPrimaryKeySelective(MaterialsInventory record);


    /**
     * 查看当前物质库存量
     * @param materialsInventory 物质库存信息
     * @return
     */
    MaterialsInventory selectByMaterialsIdAndOrgId(MaterialsInventory materialsInventory);

    /**
     * 查询操作
     * @param materialsInventory
     * @return
     */
    JSONObject list(MaterialsInventory materialsInventory);

    /**
     * 根据物料入库信息做相关的更新操作
     * @param materialsStorage
     * @return
     */
    int updateByMaterialsStorageInfo(MaterialsStorage materialsStorage);

    /**
     * 根据物料出库信息做相关的更新操作
     * @param materialsOutbound
     * @return
     */
    int updateByMaterialsOutboundInfo(MaterialsOutbound materialsOutbound);

    /**
     * 查询操作
     * @param materialsInventoryId
     * @return
     */
    MaterialsInventory selectByPrimaryKey(String materialsInventoryId);

}
